import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Form/index';
import InputTextArea from './InputTextArea.vue';
export const matchingColumns: BasicColumn[] = [
  {
    title: '匹配字段',
    dataIndex: 'field',
  },
  {
    title: '匹配属性',
    dataIndex: 'prop',
  },
  {
    title: '包含步骤',
    dataIndex: 'validActivities',
  },
  {
    title: '排除步骤',
    dataIndex: 'limitActivities',
  },
];

export const matchingSchemas: FormSchema[] = [
  {
    field: 'field',
    component: 'Select',
    label: `匹配字段`,
    required: true,
    colProps: {
      span: 12,
    },
  },
  {
    field: 'prop',
    component: 'Select',
    label: `匹配属性`,
    required: true,
    colProps: {
      span: 12,
    },
  },

  {
    field: 'validActivities',
    component: 'InputTextArea',
    label: `包含步骤`,
    itemProps: {
      autoLink: false,
    },
    colProps: {
      span: 24,
    },
    render({ model, field }) {
      return <InputTextArea vModel={[model[field], 'data']} placeholder="请输入包含步骤" />;
    },
  },
  {
    field: 'limitActivities',
    component: 'InputTextArea',
    label: `排除步骤`,
    itemProps: {
      autoLink: false,
    },
    colProps: {
      span: 24,
    },

    render({ model, field }) {
      return <InputTextArea vModel={[model[field], 'data']} placeholder="请输入排除步骤" />;
    },
  },
];
